<template>
    <div>
        <div class="swiper" :class="name">
            <div class="swiper-wrapper">
                <slot></slot>
            </div>
        </div>
    </div>
</template>
<script>
import Swiper from 'swiper'
export default {
    props:{
        name:{
            type:String,
            default:''
        },
        imgnum:{
            type:Number,
            default:3
        },
        interval:{
            type:Number,
            default:30
        }
    },
    mounted(){
        new Swiper ('.'+this.name, {
            slidesPerView: this.imgnum,
            spaceBetween: this.interval,
            freeMode: true,
    })
    }
}
</script>